export default class zuozhu extends Laya.Script {
    // 更多参数说明请访问: https://ldc2.layabox.com/doc/?nav=zh-as-2-4-0
    owner=this.owner as Laya.Sprite
    rig=null;
    timeLine=null;
    isover=true;
    constructor() { super(); }
    onAwake(){
        this.rig=this.owner.getComponent(Laya.RigidBody)
        Laya.stage.on("zuo",this,this.zuo)
        Laya.stage.on("over",this,function(){this.isover=true;})
        Laya.stage.on("start",this,function(){this.isover=false;})
    }
    zuo(){
        if(this.isover)return;
        this.timeLine=Laya.TimeLine.to(this.owner,{rotation:-30},300)
        .to(this.owner,{rotation:30},150,null,100);
        this.timeLine.play(0,false);
        Laya.stage.event("youtai")
    }
}